Using FTP Client Software
Users can use
several types of FTP client options for connecting to an FTP server.
Windows operating systems include the FTP command-line utility that
provides basic text-based functionality for connecting to an FTP server.
This is useful for performing simple operations and for testing Web
site functionality. You can also place FTP commands within a batch file
to automate common operations such as transferring backup files to a
remote server.
In addition, you can use an FTP-capable Web browser, such as Windows Internet Explorer, to connect to an FTP site. (See Figure 32) The standard syntax for the URL is ftp://ServerName. You can provide logon information and port details in the URL by using the following syntax:
ftp://UserName: Password:ServerName:Port/Path
FTP URLs are helpful
for providing quick access to files from Web sites. It is important to
note that, by default, all communications will occur using a clear text
connection. Therefore, you should generally use FTP URLs only for FTP
sites that are intended for use by anonymous users.
You can also use Windows Explorer to provide graphical access to an FTP site. (See Figure 33.)
This method gives you the benefits of using familiar commands and
functions such as drag-and-drop operations. To connect, simply enter the
FTP URL in the Address bar of Windows Explorer. You can also use the
Open FTP Site In Windows Explorer command from the Page menu of Internet
Explorer 7 if you have already connected to an FTP site. Although some
file and folder management features are limited, this is a useful method
by which even nontechnical users can access FTP-based content.
Finally, there are
numerous third-party FTP client software packages. You can find them by
doing a Web search for “ftp client software.” These products often
provide advanced features such as the ability to script common
operations and automated methods for keeping multiple folders
synchronized with the same content.
Practice: Configuring and Testing FTP
In this practice, you
will learn about the process of setting up an FTP site by using both FTP
6 and FTP 7. You will then connect to the new site by using the FTP
command-line utility.
▸ Exercise 1 Use FTP 6 to Create a New Web Site
In this exercise, you will
create a new Web site by using FTP 6. You will begin by enabling FTP 6.
The steps assume that you have already installed the Web Server (IIS)
server role, using the default options, and that you have not yet
installed the FTP Publishing Service role service.
1. | Log on to Server2 as a user with Administrator permissions.
|
2. | Open Server Manager. Expand the Roles section, right-click the Web Server (IIS) server role, and then select Add Role Services.
|
3. | On
the Select Role Services page, select FTP Publishing Service. Note that
this will automatically install the FTP Server and FTP Management
Console role services as well. Click Next to continue.
|
4. | On
the Confirm Installation Selections page, verify the selections, and
then click Install to begin the installation process. When the
installation is complete, click Finish.
|
5. | In Server Manager, note that the FTP Publishing Service is installed for the Web Server (IIS) Server role. Close Server Manager.
|
6. | To configure the FTP server, launch Internet Information Services (IIS) 6.0 Manager from the Administrative Tools program group.
|
7. | Expand
the node for Server2, and then expand the FTP Sites folder. Note that
the Default FTP Site object exists but has not been automatically
started.
|
8. | Right-click the Default FTP Site object, and then click Properties. Note the settings on the FTP Site tab.
The default settings are for the FTP site to respond on all unassigned IP addresses by using TCP port 21.
|
9. | Click the Home Directory tab to view the file system location for the FTP site’s root directory.
The default file system location is %SystemDrive%\Inetpub\Ftproot. The default permissions are to allow only Read access to the contents of this folder.
|
10. | When you are finished, click OK to close the Default FTP Site Properties dialog box.
|
11. | Next,
you will create some sample files for testing the FTP functionality.
Using Windows Explorer, open the root directory for the FTP site and
create a new folder called FTPContents. Within this folder, create a new
text file called TestFile.txt. Close Windows Explorer.
|
12. | In IIS 6.0 Manager, right-click the Default FTP Site object, and then click Start. This will start Default FTP Site.
Next, you will use the FTP command-line utility to verify the configuration of the FTP site.
|
13. | Open a command prompt by selecting Command Prompt from the Start menu. Type FTP Server2 to connect to the local FTP server.
Note that you do not need to provide a port number because the server is bound to the default port, TCP port 21.
|
14. | At the User prompt, type the name of your Windows user account. Then, type your password when prompted. At the FTP prompt, type dir
and press Enter to retrieve a list of files located in the root folder
for Default FTP Site. You should see the FTPContents folder that you
created in step 10.
|
15. | Type cd
FTPContents to change the active folder. Type dir to view a list of files. Type get TestFile.txt to download a copy of the test file you created earlier to the local working folder.
|
16. | When you are finished, type quit to exit the FTP prompt. Then, close the command prompt window.
|
17. | When you are finished, close the IIS 6.0 Manager utility.
|
▸ Exercise 2 Use FTP 7 to Add an FTP Site Binding
In this exercise, you
will create a new FTP site binding for Default Web Site, using FTP 7 and
IIS Manager. Before you begin this exercise, you must first remove FTP 6
if it is installed on Server2.contoso.com. Then, download and install
the FTP 7 package from http://www.iis.net/downloads.
1. | Log on to Server2 as a user who has Administrator permissions.
|
2. | Open IIS Manager and connect to the local server.
|
3. | Right-click the Default Web Site object in the left pane and select Edit Bindings. In the Site Bindings dialog box, click Add.
|
4. | In
the Add Site Binding dialog box, select FTP for the Type setting. Use
the default IP Address setting of All Unassigned and the default port or
port 21. Leave the Host Name section blank, and then click OK to add
the site binding.
|
5. | Verify that a new site binding for the FTP protocol on port 21 has been created. Click close on the Site Bindings dialog box.
|
6. | To view the FTP-related options for the Default Web Site, click Refresh on the View menu in IIS Manager.
You will now see an FTP section along with options for configuring
FTP settings. The Actions pane also includes commands for managing the
FTP site.
|
7. | In
the Actions pane, click Advanced Settings in the Manage FTP Site
section. Note that the Physical Path setting is mapped to the root
directory for the Default Web Site (%SystemDrive%\Inetpub\Wwwroot). Click OK to continue.
|
8. | In
Features View of IIS Manager, double-click FTP Authentication. Note
that, by default, no authentication options are enabled. Enable the
Basic Authentication and Anonymous Authentication options by selecting
them and then clicking the Enable command in the Actions pane.
|
9. | Click the Back button or the Default Web Site object to return to Features View.
|
10. | Open
the FTP SSL Settings feature. Note that, by default, the server is
configured to Require SSL Connections. For the purpose of this practice
exercise, change the setting to Allow SSL Connections. Note that you
could optionally choose an SSL certificate from the drop-down list.
Click Apply to save the settings.
|
11. | Next,
you will use the FTP command-line utility to test access to the FTP
site. Open a command prompt by selecting this command from the Start
menu. Type FTP Server2
to connect to the local FTP server. Note that you do not need to
provide a port number because the server is bound to the default port,
port 21.
|
12. | At the User prompt, enter the name of your Windows user account and enter your password when prompted. At the FTP prompt, type dir and press Enter to retrieve the list of files located in the root folder for Default Web Site. Optionally, you can use the GET and PUT commands to download and upload files. When you are finished, type quit to exit the FTP prompt. Close the command prompt window.
|
13. | When you are finished, close IIS Manager.
|